{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\FEVS_2010.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}17 Jun 2021, 23:01:27

{com}. import delimited "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\FEVS\FEVS_2010-2019\FEVS2010_PRDF.csv"
{res}{text}(92 vars, 263,475 obs)

{com}. svyset [pweight=postwt]

      {txt}pweight:{col 16}{res}postwt
          {txt}VCE:{col 16}{res}linearized
  {txt}Single unit:{col 16}{res}missing
     {txt}Strata 1:{col 16}<one>
         SU 1:{col 16}<observations>
        FPC 1:{col 16}<zero>
{p2colreset}{...}

{com}. 
. 
. 
. 
. 
. drop if q17=="X"
{txt}(12,270 observations deleted)

{com}. 
. drop if q17==""
{txt}(1,349 observations deleted)

{com}. 
. drop if q37=="X"
{txt}(11,061 observations deleted)

{com}. 
. drop if q37==""
{txt}(4,350 observations deleted)

{com}. 
. drop if q38=="X"
{txt}(8,649 observations deleted)

{com}. 
. drop if q38==""
{txt}(933 observations deleted)

{com}. 
. drop if q15=="X"
{txt}(1,758 observations deleted)

{com}. 
. drop if q15==""
{txt}(602 observations deleted)

{com}. 
. drop if q22=="X"
{txt}(6,932 observations deleted)

{com}. 
. drop if q22==""
{txt}(404 observations deleted)

{com}. 
. drop if q25=="X"
{txt}(3,786 observations deleted)

{com}. 
. drop if q25==""
{txt}(538 observations deleted)

{com}. 
. drop if q33=="X"
{txt}(3,521 observations deleted)

{com}. 
. drop if q33==""
{txt}(665 observations deleted)

{com}. 
. drop if q48==.
{txt}(1,172 observations deleted)

{com}. 
. drop if q49==.
{txt}(358 observations deleted)

{com}. 
. 
. 
. destring q17, replace
{txt}q17: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q37, replace
{txt}q37: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q38, replace
{txt}q38: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q15, replace
{txt}q15: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q22, replace
{txt}q22: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q25, replace
{txt}q25: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q33, replace
{txt}q33: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. 
. 
. svy linearized : sem (JUSTICE -> DISTRIBUTIVE, ) (JUSTICE -> PROCEDURAL, ) (JUSTICE -> INTERPERSONAL, ) (DISTRIBUTIVE -> q22, ) (DISTRIBUTIVE -> q25, ) (DISTRIBUTIVE -> q33, ) (PROCEDURAL -> q15, ) (PROCEDURAL -> q17, ) (PROCEDURAL -> q37, ) (PROCEDURAL -> q38, )(INTERPERSONAL -> q48, ) (INTERPERSONAL -> q49, ), standardized latent(JUSTICE DISTRIBUTIVE PROCEDURAL INTERPERSONAL ) nocapslatent
{txt}(running sem on estimation sample)
{res}
{txt}{col 1}Survey: Structural equation model{col 49}Number of obs{col 67}= {res}   205,127
{txt}{col 1}Number of strata{col 22}= {res}        1{txt}{col 49}Population size{col 67}={res}  1,342,000
{txt}{col 1}Number of PSUs{col 22}= {res}  205,127{txt}{col 49}Design df{col 67}= {res}   205,126

{p 0 7}{space 1}{text:( 1)}{space 1} [q22]DISTRIBUTIVE = 1{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} [q15]PROCEDURAL = 1{p_end}
{p 0 7}{space 1}{text:( 3)}{space 1} [q48]INTERPERSONAL = 1{p_end}
{p 0 7}{space 1}{text:( 4)}{space 1} [DISTRIBUTIVE]JUSTICE = 1{p_end}
{txt}{hline 20}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 21}{c |}{col 33}  Linearized
{col 1}       Standardized{col 21}{c |}      Coef.{col 33}   Std. Err.{col 45}      t{col 53}   P>|t|{col 61}     [95% Con{col 74}f. Interval]
{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}Structural         {col 21}{txt}{c |}
{space 2}{col 3}DISTRIBUTIVE     {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .8665881{col 33}{space 2} .0072317{col 44}{space 1}  119.83{col 53}{space 3}0.000{col 61}{space 4} .8524142{col 74}{space 3}  .880762
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}PROCEDURAL       {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .9737699{col 33}{space 2} .0078757{col 44}{space 1}  123.64{col 53}{space 3}0.000{col 61}{space 4} .9583338{col 74}{space 3} .9892061
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}INTERPERSONAL    {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .7056408{col 33}{space 2} .0091943{col 44}{space 1}   76.75{col 53}{space 3}0.000{col 61}{space 4} .6876202{col 74}{space 3} .7236615
{txt}{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}Measurement        {col 21}{txt}{c |}
{space 2}{col 3}q22              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .8424355{col 33}{space 2} .0040652{col 44}{space 1}  207.23{col 53}{space 3}0.000{col 61}{space 4} .8344678{col 74}{space 3} .8504033
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.458464{col 33}{space 2}  .018628{col 44}{space 1}  131.98{col 53}{space 3}0.000{col 61}{space 4} 2.421954{col 74}{space 3} 2.494975
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q25              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .8246562{col 33}{space 2} .0050172{col 44}{space 1}  164.37{col 53}{space 3}0.000{col 61}{space 4} .8148227{col 74}{space 3} .8344897
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.545761{col 33}{space 2} .0217149{col 44}{space 1}  117.24{col 53}{space 3}0.000{col 61}{space 4} 2.503201{col 74}{space 3} 2.588322
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q33              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .7247071{col 33}{space 2} .0060089{col 44}{space 1}  120.61{col 53}{space 3}0.000{col 61}{space 4} .7129298{col 74}{space 3} .7364844
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.390082{col 33}{space 2}  .016085{col 44}{space 1}  148.59{col 53}{space 3}0.000{col 61}{space 4} 2.358556{col 74}{space 3} 2.421608
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q15              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .6228354{col 33}{space 2} .0103364{col 44}{space 1}   60.26{col 53}{space 3}0.000{col 61}{space 4} .6025763{col 74}{space 3} .6430944
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.176967{col 33}{space 2} .0365682{col 44}{space 1}   86.88{col 53}{space 3}0.000{col 61}{space 4} 3.105294{col 74}{space 3} 3.248639
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q17              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .7183545{col 33}{space 2} .0100685{col 44}{space 1}   71.35{col 53}{space 3}0.000{col 61}{space 4} .6986205{col 74}{space 3} .7380884
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.007777{col 33}{space 2} .0300659{col 44}{space 1}  100.04{col 53}{space 3}0.000{col 61}{space 4} 2.948849{col 74}{space 3} 3.066706
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q37              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .8145065{col 33}{space 2} .0072186{col 44}{space 1}  112.84{col 53}{space 3}0.000{col 61}{space 4} .8003583{col 74}{space 3} .8286547
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.799433{col 33}{space 2} .0248086{col 44}{space 1}  112.84{col 53}{space 3}0.000{col 61}{space 4} 2.750808{col 74}{space 3} 2.848057
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q38              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .8029717{col 33}{space 2} .0065505{col 44}{space 1}  122.58{col 53}{space 3}0.000{col 61}{space 4} .7901329{col 74}{space 3} .8158105
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.322231{col 33}{space 2} .0388718{col 44}{space 1}   85.47{col 53}{space 3}0.000{col 61}{space 4} 3.246043{col 74}{space 3} 3.398418
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q48              {col 21}{c |}
{space 6}INTERPERSONAL {c |}{col 21}{res}{space 2} .9364441{col 33}{space 2} .0034687{col 44}{space 1}  269.97{col 53}{space 3}0.000{col 61}{space 4} .9296455{col 74}{space 3} .9432427
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.712917{col 33}{space 2} .0490894{col 44}{space 1}   75.64{col 53}{space 3}0.000{col 61}{space 4} 3.616703{col 74}{space 3} 3.809131
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q49              {col 21}{c |}
{space 6}INTERPERSONAL {c |}{col 21}{res}{space 2} .9112594{col 33}{space 2} .0044779{col 44}{space 1}  203.50{col 53}{space 3}0.000{col 61}{space 4} .9024829{col 74}{space 3} .9200359
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.995368{col 33}{space 2} .0593081{col 44}{space 1}   67.37{col 53}{space 3}0.000{col 61}{space 4} 3.879126{col 74}{space 3} 4.111611
{txt}{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 10}var(e.q22){c |}{col 21}{res}{space 2} .2903024{col 33}{space 2} .0068494{col 61}{space 4} .2771834{col 74}{space 3} .3040422
{txt}{space 10}var(e.q25){c |}{col 21}{res}{space 2} .3199421{col 33}{space 2} .0082749{col 61}{space 4} .3041278{col 74}{space 3} .3365788
{txt}{space 10}var(e.q33){c |}{col 21}{res}{space 2} .4747996{col 33}{space 2} .0087094{col 61}{space 4} .4580327{col 74}{space 3} .4921803
{txt}{space 10}var(e.q15){c |}{col 21}{res}{space 2} .6120761{col 33}{space 2} .0128757{col 61}{space 4} .5873532{col 74}{space 3} .6378397
{txt}{space 10}var(e.q17){c |}{col 21}{res}{space 2} .4839669{col 33}{space 2} .0144655{col 61}{space 4} .4564294{col 74}{space 3} .5131657
{txt}{space 10}var(e.q37){c |}{col 21}{res}{space 2} .3365792{col 33}{space 2} .0117591{col 61}{space 4}  .314303{col 74}{space 3} .3604343
{txt}{space 10}var(e.q38){c |}{col 21}{res}{space 2} .3552365{col 33}{space 2} .0105197{col 61}{space 4} .3352051{col 74}{space 3}  .376465
{txt}{space 10}var(e.q48){c |}{col 21}{res}{space 2} .1230725{col 33}{space 2} .0064965{col 61}{space 4}  .110976{col 74}{space 3} .1364876
{txt}{space 10}var(e.q49){c |}{col 21}{res}{space 2} .1696063{col 33}{space 2}  .008161{col 61}{space 4}  .154342{col 74}{space 3} .1863802
{txt}{space 1}var(e.DISTRIBUTIVE){c |}{col 21}{res}{space 2} .2490251{col 33}{space 2} .0125338{col 61}{space 4}  .225632{col 74}{space 3} .2748435
{txt}{space 3}var(e.PROCEDURAL){c |}{col 21}{res}{space 2} .0517721{col 33}{space 2} .0153382{col 61}{space 4} .0289677{col 74}{space 3} .0925288
{txt}var(e.INTERPERSONAL){c |}{col 21}{res}{space 2}  .502071{col 33}{space 2} .0129758{col 61}{space 4} .4772722{col 74}{space 3} .5281583
{txt}{space 8}var(JUSTICE){c |}{col 21}{res}{space 2}        1{col 33}{space 2}        .{col 61}{space 4}        .{col 74}{space 3}        .
{txt}{hline 20}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. 
. 
. 
. estat gof, stats(all)
{res}
{txt}{hline 21}{c TT}{hline 54}
{lalign 21:Fit statistic}{c |}      Value   Description
{hline 21}{c +}{hline 54}
{lalign 21:Size of residuals}{c |}
{ralign 20:SRMR} {c |} {res}{ralign 10:     0.038}{txt}   Standardized root mean squared residual
{ralign 20:CD} {c |} {res}{ralign 10:     0.957}{txt}   Coefficient of determination
{hline 21}{c BT}{hline 54}
{p 0 2 2 75}Note: model was fit with{txt} svy: prefix; only stats(residuals) valid.{p_end}

{com}. predict justice, latent(JUSTICE)
{res}
{com}. 
. 
. 
. egen average_justice = mean (justice), by (agency)

. 
. 
. 
. egen sub_average_justice = mean (justice), by (subelem)

. save "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\2010FEVS_Justice.dta"
{txt}file C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\2010FEVS_Justice.dta saved

{com}. exit, clear
